#from openopt import NLP, GLP
from scipy import optimize
from numpy import eye, cos, arange, ones, asarray, abs, zeros, sqrt, asscalar, array, radians, degrees
import pylab
from string import rjust, ljust, expandtabs
import time
import JT


class Test():
    def __init__(self):            
        pass
    
    def run(self,n_pose):
        """
        """
#===============================================================================
#    Setup Optimizer
#===============================================================================
        reg_optimizer = Optimize.Optimize()
        reg_optimizer.Setup()
        
        (xmin, Jmin, ierr, feval) = optimize.fminbound(
                                    f, lowerBounds, upperBounds, args=(debug,plot), xtol = 0.0001,
                                    maxfun = maxeval, full_output = 1, disp = 1)
        
        print xopt1
      
        end_time = time.time()
        
        #===============================================================================
        #    Display/Save Results
        #===============================================================================
        print "Starting Pose: ", pose
        print "Final Pose   : ", xopt1
        

if __name__ == "__main__":
    T = Test()
#    for i in range(11):
#        T.run_test(n_pose=45+i)
    T.run_test(n_pose=50)
    #pylab.show()


